Skip to content

build(pyproject): declare requires-python via PEP 621 [project] metadata#2213

Merged
hansthen merged 2 commits intopython-visualization:mainfrom
chid:chore/add-pep621-requires-python
Apr 23, 2026
Merged

build(pyproject): declare requires-python via PEP 621 [project] metadata#2213
hansthen merged 2 commits intopython-visualization:mainfrom
chid:chore/add-pep621-requires-python

Conversation

@chid
Copy link
Copy Markdown
Contributor

@chid chid commented Mar 8, 2026

Add a minimal [project] table to pyproject.toml and set:

  • requires-python = ">=3.9"
  • name = "folium"
  • dynamic = [...] for fields still sourced from setup.py

Why this is needed:

python_requires in setup.py is not enough for tools that read interpreter constraints from pyproject.toml metadata. Per PEP 621, requires-python belongs in [project], which allows uv to resolve/lock against the correct Python range instead of defaulting incorrectly (see astral-sh/uv#11424).

…etadata

  Add a minimal `[project]` table to `pyproject.toml` and set:

  - `requires-python = ">=3.9"`
  - `name = "folium"`
  - `dynamic = [...]` for fields still sourced from `setup.py`

  Why this is needed:
  `python_requires` in `setup.py` is not enough for tools that read interpreter
  constraints from `pyproject.toml` metadata. Per PEP 621, `requires-python`
  belongs in `[project]`, which allows `uv` to resolve/lock against the correct
  Python range instead of defaulting incorrectly (see
  astral-sh/uv#11424).
@chid chid marked this pull request as ready for review March 8, 2026 15:11
@hansthen
Copy link
Copy Markdown
Collaborator

The pre-commit hooks are failing on the autoformatter. (Which is weird because I see no change in the corresponding files). This change is required for uv? It seems okay for now.

@hansthen hansthen merged commit 90a8c46 into python-visualization:main Apr 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants